<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddressBooksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_address_books', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_name')->comment('用户姓名');
            $table->integer('sex')->comment('1男2女');
            $table->integer('age')->comment('年龄');
            $table->integer('type')->comment('1关注患者2门诊患者3住院患者');
            $table->json('image')->comment('病例图片');
            $table->text('describe')->comment('病情描述');
            $table->string('phone')->comment('手机号');
            $table->integer('doctor_id')->default(0)->comment('医生ID');
            $table->integer('work_id')->default(0)->comment('工作室ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_address_books');
    }
}
